//
//  TJTemplateTagCell.m
//  BaoDian
//
//  Created by mac on 2024/8/4.
//

#import "TJTemplateTagCell.h"


@interface TJTemplateTagCell()

@property (nonatomic, weak) UILabel *textLabel;

@end

@implementation TJTemplateTagCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        
        UILabel *textLabel = [UILabel lableWithSuperView:self.contentView font:UIFontMake(12) color:UIColor.whiteColor title:nil textAlignment:NSTextAlignmentCenter];
        textLabel.addCornerRadius(9);
        textLabel.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0.3];
        [textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.offset(0);
        }];
        _textLabel = textLabel;
    }
    return self;
}

- (void)setModel:(TJTemplateTagModel *)model {
    _model = model;
    
    _textLabel.text = model.text;
}

@end
